package cn.biplam.front.component.data.tree.treeIndex;

import cn.biplam.common.wrapper.ErrorMessage;
import cn.biplam.front.component.AjxResponse;
import cn.biplam.front.component.data.tree.TreeData;
import cn.biplam.front.template.callback.TreeCallBack;

/**
 *  模型管理树基本DC
 * @author XiaoRuxing Nov 7, 200912:13:14 PM
 * @version 1.0
 */
public abstract class ModelTreeDc extends AjxResponse{
	
	/** 获取节点过滤列表操作OperatorID */
	protected String filterOperatorId = null;
	
	/**
	 * 设置取指定节点的子树参数信息
	 * @return
	 * @throws ErrorMessage 
	 */
	public abstract TreeData getTreeData(String userID,
			String nodeId,
			String levelDown,
			String nodeLevel,
			String haveBrother,
			String haveLBrother,
			String parentsHaveLBrother) throws ErrorMessage;
	
	/**
	 * 设置取指定节点的子树参数信息
	 * @return 父子树形式的模型导航树(目前用于主题选择)
	 * @throws ErrorMessage 
	 */
	public abstract TreeData getTreeData(String userID,
			String nodeId,
			String levelDown,
			String nodeLevel,
			String haveBrother,
			String haveLBrother,
			String parentsHaveLBrother,
			String operatorID) throws ErrorMessage;
	
	/**
	 * 设置取指定节点的子树参数信息
	 * @param userID      用户ID
	 * @param nodeId      当前节点id
	 * @param nodeLevel   当前节点级别，当取根节点的时候 级别为0
	 * @param levelDown   向下取几级数据 -1 全部 0 当前  1 当前节点下1级 2当前节点向下2级 ... n当前节点向下n级
	 * @param parentsHaveLBrother  父亲们是否有弟弟
	 * @throws ErrorMessage
	 */
	public abstract TreeData getIndexTreeData(String userID,
			String nodeId,
			String nodeLevel,
			String levelDown,
			String haveBrother,
			String haveLBrother,
			String parentsHaveLBrother) throws ErrorMessage;
	
	/**
	 * 返回回调函数，这个函数提供 获取TreeData数据所需的operatorId
	 */
	public abstract TreeCallBack getCallBack(String targetID,String actionId,String businessFlag);
	
	/**
	 *  设置虚根节点是否显示
	 * @param virtualNodeVisialble
	 */
	public abstract void setVirtualNodeVisiable(boolean virtualNodeVisialble);
	
	/**
	 *  获取节点过滤列表操作OperatorID
	 * @param filterOperatorId 节点过滤列表操作OperatorID
	 */
	public void setFilterOperatorId(String filterOperatorId) {
		this.filterOperatorId = filterOperatorId;
	}
}
